﻿using System;
using System.Collections.Generic;
using System.Windows.Forms;
using System.Text;
using System.Drawing.Drawing2D;
using System.Drawing;

namespace XiaoGang.Soft.XGWMS.UI
{
    class CBTNMax:CaptionControlButton
    {
        public override void DrawContext(System.Windows.Forms.PaintEventArgs e)
        {
            Form frm = FindForm();
            Rectangle rect = Rectangle.Empty;

            if (frm.WindowState == FormWindowState.Maximized)
            {
                rect = new Rectangle(8, 5, Width - 14, Height - 14);
                e.Graphics.DrawRectangle(Pens.White, rect);
                rect.X = 5;
                rect.Y = 8;
                e.Graphics.DrawRectangle(Pens.White, rect);

            }
            else
            {
                rect = new Rectangle(5, 5, Width - 11, Height - 11);
                e.Graphics.DrawRectangle(Pens.White, rect);
            }
        }
    }
}
